// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_INV_CHECKING_PLAN_ITEM
// * CreateDate    : 2012/11/8 12:11:57
// * Creater       : InvCheckingPlanItemEntity
// * LastChangeDate: 2012/11/8 12:11:57
// * LastChanger   : 2012/11/8 12:11:57
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class InvCheckingPlanItemEntity : EntityBase
    {
        public InvCheckingPlanItemTable TableSchema
        {
            get
            {
                return InvCheckingPlanItemTable.Current;
            }
        }

        public InvCheckingPlanItemEntity()
        {

        }

        public InvCheckingPlanItemEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.CheckingPlanItemId = Convert.ToString(CommonFunctions.ToObject(dr["CHECKING_PLAN_ITEM_ID"]));
            this.CheckingPlanId = Convert.ToString(CommonFunctions.ToObject(dr["CHECKING_PLAN_ID"]));
            this.WarehouseCode = Convert.ToString(CommonFunctions.ToObject(dr["WAREHOUSE_CODE"]));
            this.WarehouseName = Convert.ToString(CommonFunctions.ToObject(dr["WAREHOUSE_NAME"]));
            this.LocationId = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_ID"]));
            this.LocationCode = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_CODE"]));
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.CurrentStorageQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["CURRENT_STORAGE_QTY"]));
            this.StorageOccupiedQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["STORAGE_OCCUPIED_QTY"]));
            this.ActualQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["ACTUAL_QTY"]));
            this.CheckingPerson = Convert.ToString(CommonFunctions.ToObject(dr["CHECKING_PERSON"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public InvCheckingPlanItemEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.CheckingPlanItemId = Convert.ToString(CommonFunctions.ToObject(dr["CHECKING_PLAN_ITEM_ID"]));
            this.CheckingPlanId = Convert.ToString(CommonFunctions.ToObject(dr["CHECKING_PLAN_ID"]));
            this.WarehouseCode = Convert.ToString(CommonFunctions.ToObject(dr["WAREHOUSE_CODE"]));
            this.WarehouseName = Convert.ToString(CommonFunctions.ToObject(dr["WAREHOUSE_NAME"]));
            this.LocationId = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_ID"]));
            this.LocationCode = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_CODE"]));
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.CurrentStorageQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["CURRENT_STORAGE_QTY"]));
            this.StorageOccupiedQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["STORAGE_OCCUPIED_QTY"]));
            this.ActualQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["ACTUAL_QTY"]));
            this.CheckingPerson = Convert.ToString(CommonFunctions.ToObject(dr["CHECKING_PERSON"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return InvCheckingPlanItemTable.Current;
            }
        }

        #region Perporty List
        public string CheckingPlanItemId
        {
            get { return Convert.ToString(GetData(InvCheckingPlanItemTable.C_CHECKING_PLAN_ITEM_ID)); }
            set { SetData(InvCheckingPlanItemTable.C_CHECKING_PLAN_ITEM_ID, value); }
        }

        public string CheckingPlanId
        {
            get { return Convert.ToString(GetData(InvCheckingPlanItemTable.C_CHECKING_PLAN_ID)); }
            set { SetData(InvCheckingPlanItemTable.C_CHECKING_PLAN_ID, value); }
        }

        public string WarehouseCode
        {
            get { return Convert.ToString(GetData(InvCheckingPlanItemTable.C_WAREHOUSE_CODE)); }
            set { SetData(InvCheckingPlanItemTable.C_WAREHOUSE_CODE, value); }
        }

        public string WarehouseName
        {
            get { return Convert.ToString(GetData(InvCheckingPlanItemTable.C_WAREHOUSE_NAME)); }
            set { SetData(InvCheckingPlanItemTable.C_WAREHOUSE_NAME, value); }
        }

        public string LocationId
        {
            get { return Convert.ToString(GetData(InvCheckingPlanItemTable.C_LOCATION_ID)); }
            set { SetData(InvCheckingPlanItemTable.C_LOCATION_ID, value); }
        }

        public string LocationCode
        {
            get { return Convert.ToString(GetData(InvCheckingPlanItemTable.C_LOCATION_CODE)); }
            set { SetData(InvCheckingPlanItemTable.C_LOCATION_CODE, value); }
        }

        public string ProductId
        {
            get { return Convert.ToString(GetData(InvCheckingPlanItemTable.C_PRODUCT_ID)); }
            set { SetData(InvCheckingPlanItemTable.C_PRODUCT_ID, value); }
        }

        public decimal CurrentStorageQty
        {
            get { return Convert.ToDecimal(GetData(InvCheckingPlanItemTable.C_CURRENT_STORAGE_QTY)); }
            set { SetData(InvCheckingPlanItemTable.C_CURRENT_STORAGE_QTY, value); }
        }

        public decimal StorageOccupiedQty
        {
            get { return Convert.ToDecimal(GetData(InvCheckingPlanItemTable.C_STORAGE_OCCUPIED_QTY)); }
            set { SetData(InvCheckingPlanItemTable.C_STORAGE_OCCUPIED_QTY, value); }
        }

        public decimal ActualQty
        {
            get { return Convert.ToDecimal(GetData(InvCheckingPlanItemTable.C_ACTUAL_QTY)); }
            set { SetData(InvCheckingPlanItemTable.C_ACTUAL_QTY, value); }
        }

        public string CheckingPerson
        {
            get { return Convert.ToString(GetData(InvCheckingPlanItemTable.C_CHECKING_PERSON)); }
            set { SetData(InvCheckingPlanItemTable.C_CHECKING_PERSON, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(InvCheckingPlanItemTable.C_REMARK)); }
            set { SetData(InvCheckingPlanItemTable.C_REMARK, value); }
        }

        #endregion
    }


}

